home *** CD-ROM | disk | FTP | other *** search
/ BCI NET 2 / BCI NET 2.iso / archives / programming / languages / pcq_incl3v1.lha / Graphics / Layers.i < prev    next >
Encoding:
Text File  |  1994-10-12  |  3.9 KB  |  139 lines

  1. {
  2.         Layers.i for PCQ Pascal
  3. }
  4.  
  5. {$I   "Include:Exec/Lists.i"}
  6. {$I   "Include:Exec/Semaphores.i"}
  7. {$I   "Include:Utility/Hooks.i"}
  8.  
  9. var
  10.     LayersBase  : Address;
  11.  
  12. const
  13.  
  14.     LAYERSIMPLE         = 1;
  15.     LAYERSMART          = 2;
  16.     LAYERSUPER          = 4;
  17.     LAYERUPDATING       = $10;
  18.     LAYERBACKDROP       = $40;
  19.     LAYERREFRESH        = $80;
  20.     LAYER_CLIPRECTS_LOST = $100;        { during BeginUpdate }
  21.                                         { or during layerop }
  22.                                         { this happens if out of memory }
  23.     LMN_REGION          = -1;
  24.  
  25. type
  26.  Layer_Info = Record
  27.     top_layer           : Address;
  28.     check_lp            : Address;              { !! Private !! }
  29.     obs                 : Address;
  30.     FreeClipRects       : Address;              { !! Private !! }
  31.     PrivateReserve1,                            { !! Private !! }
  32.     PrivateReserve2     : Integer;              { !! Private !! }
  33.     Lock                : SignalSemaphore;      { !! Private !! }
  34.     gs_Head             : MinList;              { !! Private !! }
  35.     PrivateReserve3     : WORD;                 { !! Private !! }
  36.     PrivateReserve4     : Address;              { !! Private !! }
  37.     Flags               : WORD;
  38.     fatten_count        : Byte;                 { !! Private !! }
  39.     LockLayersCount     : Byte;                 { !! Private !! }
  40.     PrivateReserve5     : WORD;                 { !! Private !! }
  41.     BlankHook,                                  { !! Private !! }
  42.     LayerInfo_extra     : Address;              { !! Private !! }
  43.  end;
  44.  Layer_InfoPtr = ^Layer_info;
  45.  
  46. const
  47.     NEWLAYERINFO_CALLED = 1;
  48.  
  49. {
  50.  * LAYERS_NOBACKFILL is the value needed to get no backfill hook
  51.  * LAYERS_BACKFILL is the value needed to get the default backfill hook
  52.  }
  53.  LAYERS_NOBACKFILL      = 1;
  54.  LAYERS_BACKFILL        = 0;
  55.  
  56. Function BeginUpdate(l : LayerPtr): Boolean;
  57.     External;
  58.  
  59. Function BehindLayer(l : LayerPtr) : Boolean;
  60.     External;
  61.  
  62. Function CreateBehindLayer(li : Layer_InfoPtr; bm : Address;
  63.                            x0,y0,x1,y1 : Integer; flags : Integer;
  64.                            bm2 : Address) : LayerPtr;
  65.     External;
  66.  
  67. Function CreateUpfrontLayer(li : Layer_InfoPtr; bm : Address;
  68.                             x0,y0,x1,y1 : Integer; flags : Integer;
  69.                             bm2 : Address) : LayerPtr;
  70.     External;
  71.  
  72. Function DeleteLayer(l : LayerPtr) : Boolean;
  73.     External;
  74.  
  75. Procedure DisposeLayerInfo(li : Layer_InfoPtr);
  76.     External;
  77.  
  78. Procedure EndUpdate(l : LayerPtr; flag : Boolean);
  79.     External;
  80.  
  81. Function InstallClipRegion(l : LayerPtr; region : Address) : Address;
  82.     External;   { both Address's are RegionPtr }
  83.  
  84. Procedure LockLayer(l : LayerPtr);
  85.     External;
  86.  
  87. Procedure LockLayerInfo(li : Layer_InfoPtr);
  88.     External;
  89.  
  90. Procedure LockLayers(li : Layer_InfoPtr);
  91.     External;
  92.  
  93. Function MoveLayer(l : LayerPtr; dx, dy : Integer) : Boolean;
  94.     External;
  95.  
  96. Function MoveLayerInFrontOf(layertomove, targetlayer : LayerPtr) : Boolean;
  97.     External;
  98.  
  99. Function NewLayerInfo : Layer_InfoPtr;
  100.     External;
  101.  
  102. Procedure ScrollLayer(l : LayerPtr; dx, dy : Integer);
  103.     External;
  104.  
  105. Function SizeLayer(l : LayerPtr; dx, dy : Integer) : Boolean;
  106.     External;
  107.  
  108. Procedure SwapBitsRastPortClipRect(rp : Address; cr : Address);
  109.     External;   { rp is a RastPortPtr }
  110.                 { cr is a ClipRectPtr }
  111.  
  112. Procedure UnlockLayer(l : LayerPtr);
  113.     External;
  114.  
  115. Procedure UnlockLayerInfo(li : Layer_InfoPtr);
  116.     External;
  117.  
  118. Procedure UnlockLayers(li : Layer_InfoPtr);
  119.     External;
  120.  
  121. Function UpfrontLayer(l : LayerPtr) : Boolean;
  122.     External;
  123.  
  124. Function WhichLayer(li : Layer_InfoPtr; x, y : Integer) : LayerPtr;
  125.     External;
  126.  
  127. { --- functions in V39 or higher (Release 3) --- }
  128.  
  129. FUNCTION InstallLayerInfoHook(li : Layer_InfoPtr; H : HookPtr) : HookPtr;
  130.     External;
  131.  
  132. PROCEDURE SortLayer(l : LayerPtr; dx, dy : Integer);
  133.     External;
  134.  
  135. PROCEDURE DoHookClipRects(H : HookPtr; RP : rastPortPtr; Rect : RectanglePtr);
  136.     External;
  137.  
  138.  
  139.